Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore G61/G61.1/G64 state after abort
After abort, restore motion control mode and blend/naive CAM tolerances to state of last executing motion before the abort. This depends on Rob Ellenberg's state tags work. The `state_tag_t` struct keeps integer settings in an array, indexed by the `StateField` enum. Introducing the `G64 P* Q*` tolerances adds two more `float` types to the existing two for feed and speed. This patch packs those all into a new array of floats, indexed by a new enum, to simplify handling. These new floats are exposed in the python module `status.settings` attribute, positions 3 and 4. Restoring this state has two parts. The motion control mode G61/G61.1/G64 would have been handled by `Interp::gen_g_codes()`, and the G64 blend/naive CAM tolerances would have been handled by `Interp::gen_settings()`. However, a switch from G61/G61.1 to G64 and a simultaneous switch of P/Q tolerance values cannot be done with two independent functions. Therefore, `gen_g_codes()` has been merged into `gen_settings()` in order to handle this special case. To keep the tolerances updated during program execution, they are added to the `Interp::synch()` function. To restore the naive CAM tolerance, a new function `GET_EXTERNAL_MOTION_CONTROL_NAIVECAM_TOLERANCE()` is introduced, parallel to `GET_EXTERNAL_MOTION_CONTROL_TOLERANCE()` for blend tolerance. This patch fixes #177, "Forgetting G64 mode after E-stop," and one of the remaining issues in #134, "Updating `state-tags-master` branch for acceptance into LinuxCNC." Signed-off-by: John Morris <john@zultron.com>
- Loading branch information
Showing
18 changed files
with
182 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.